<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>



<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.08">
<LINK rel="stylesheet" type="text/css" href="umsroot.css">
<TITLE>
Introduction
</TITLE>
</HEAD>
<BODY >
<A HREF="umsroot093.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="umsroot095.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H2 CLASS="section"><A NAME="htoc218">16.1</A>&nbsp;&nbsp;Introduction</H2>
The <EM>attributed variable</EM> is a special ECL<SUP><I>i</I></SUP>PS<SUP><I>e</I></SUP>data type which
represents a variable together with attached attributes.
In the literature, attributed variables are sometimes referred to as
<A NAME="@default898"></A>
&#8220;metaterms&#8221;. 
The name <EM>metaterm</EM> originates from its application in meta-programming:
for an object-level program, a metaterm looks like a variable, but for
a meta-program the same variable is just a piece of data which, possibly
together with additional meta-level information, forms the metaterm.<BR>
<BR>
The attributed variable is a powerful means to implement various extensions of the
plain Prolog language.
In particular, it allows the system's behaviour
on unification to be customised.
In most situations, an attributed variable behaves like a normal
variable.
E.g. it can be unified with other terms and <A HREF="../bips/kernel/typetest/var-1.html"><B>var/1</B></A><A NAME="@default899"></A> succeeds on it.
The differences compared to a plain variable are:
<UL CLASS="itemize"><LI CLASS="li-itemize">
an attributed variable has a number of associated <I>attributes</I>
<LI CLASS="li-itemize">the attributes are included in the module system
<LI CLASS="li-itemize">when an attributed variable occurs in the unification and in some
built-in predicates, each attribute is processed by a user-defined
<I>handler</I>
</UL>
<HR>
<A HREF="umsroot093.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="umsroot095.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
